@using BlazorApp.Pages.Common.Html
@using BlazorApp.Pages.Common.Html.HTable
@using BlazorApp.Pages.Common.Metadata
@using BlazorApp.Pages.Event
@inherits BlazorApp.Pages.Common.DrawerPageBase<Entity.PortForward>
@if (Item != null)
{
    <PortForwardAction Item="Item" MenuMode="MenuMode.Horizontal"></PortForwardAction>
    <MetadataView Item="Item.Metadata"></MetadataView>
    <HTable Bordered Column="1">

        <HTableColumn Title=@L["KubePort"]>
            <Tag Color="#2db7f5"> @Item.Type </Tag>
            <Tag Color="#2db7f5"> @Item.KubeName </Tag>
            <Tag Color="#2db7f5">@Item.KubePort</Tag>
            =>
            <Tag Color="DarkRed">@Item.LocalPort</Tag>

        </HTableColumn>

        <HTableColumn Title=@L["Status"]>
            @Item.Status (@Item.StatusTimestamp)
        </HTableColumn>
        <HTableColumn Title=@L["View"]>
            <div>
                <a href=@($"http://127.0.0.1:{Item.LocalPort}") target="_blank">Http</a>
                <a href=@($"https://127.0.0.1:{Item.LocalPort}") target="_blank">Https</a>
            </div>
        </HTableColumn>
    </HTable>
    <MiniEventListView Uid="@Item.Metadata.Uid"></MiniEventListView>
}
